package com.firstgroup.dms.mapper;

import com.firstgroup.dms.pojo.ProcurementInformation;
import com.firstgroup.dms.pojo.ProcurementDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

@Mapper
public interface ProcurementMapper {
    int insert(ProcurementInformation procurement);

    int insertDetail(ProcurementDetail detail);

    List<ProcurementInformation> selectByPage(Map<String, Object> params);

    int selectCount(Map<String, Object> params);

    int deleteById(@Param("id") Integer id);

    int deleteDetailsByPurchaseId(@Param("id") Integer id);

    ProcurementInformation selectById(@Param("id") Integer id);

    // 获取药品入库总数量
    Integer getInStockQuantity(Integer drugId);
}